package com.jy.project.mapper;

import com.jy.project.domain.Apply;
import com.jy.project.domain.ApplyCollect;
import com.jy.project.domain.ToDoTasks;
import com.jy.project.dto.ApplyDeptAdminQueryDTO;
import com.jy.project.dto.ApplyQueryDTO;
import com.jy.project.dto.ApplyUserQueryDTO;
import com.jy.project.dto.ToDoTasksDTO;
import com.jy.project.vo.ApplyDeptAdminVO;
import com.jy.project.vo.ApplyQualitVO;
import com.jy.project.vo.ApplyUserVO;
import com.jy.project.vo.ToDoTasksVO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.special.InsertListMapper;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

public interface ToDoTasksMapper extends Mapper<ToDoTasks>,InsertListMapper<ToDoTasks> {

    List<ToDoTasksVO> listToDoTasksVO(ToDoTasksDTO dto);

    default ToDoTasks getDoTasks(String applyNo){
        Example example=new Example(ToDoTasks.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("isDelete",0)
                .andEqualTo("applyNo",applyNo);
        ToDoTasks tasks = this.selectOneByExample(example);
        return tasks;
    }

}